<?php
/**
 * @project     : Travel
 * @copyright   : 
 * @desc        : Thuc hien cac thao tac tren bang menu_admin
 * @coder       : Truong cong quyen
 * @createdate  : 3/11/2011
*/
class Menu_admin_model extends CI_Model
{
    var $menu_admin_id=0;
    var $menu_admin_name='';
    var $menu_admin_link='';
    var $menu_admin_status=1;
    var $menu_admin_cat_id='';
    var $menu_admin_controller='';
    

    
    public function __construct() {
        parent::__construct();
    }
    
    function get_all($status=1)
    {
        if($status!=-1)
        {
            $this->db->where('menu_admin_status', $status);
        }
        $query = $this->db->get('menu_admin');
        return $query->result();
        
    }
    
     function get_by_id($id)
    {
        $this->db->where('menu_admin_id', $id);
        $query = $this->db->get('menu_admin');
        return $query->row();
    }
    

}